SET(CPACK_GENERATOR "Bundle" PARENT_SCOPE)
SET(CPACK_BUNDLE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/Monteverdi.icns" PARENT_SCOPE)
SET(CPACK_BUNDLE_NAME "Monteverdi-${Monteverdi_VERSION_MAJOR}.${Monteverdi_VERSION_MINOR}" PARENT_SCOPE)
SET(CPACK_BUNDLE_PLIST "${CMAKE_CURRENT_BINARY_DIR}/Info.plist" PARENT_SCOPE)
SET(CPACK_BUNDLE_STARTUP_COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/StartupCommand" PARENT_SCOPE)

CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.in ${CMAKE_CURRENT_BINARY_DIR}/Info.plist)

INSTALL(DIRECTORY $ENV{GDAL_DATA}
              DESTINATION share
              COMPONENT Resources)

INSTALL(SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/BundleFixing.cmake
        COMPONENT Runtime)
